<?php
    include 'init.php';

    //接收用户要修改的相册 id 及相册名称
    $id = $_POST['album_id'];

    $name = $_POST['name'];

    $sql = "update album set name='$name' where id='$id'";

    
    $result = mysql_query($sql);

    if($result && mysql_affected_rows()>0){
        redirect('修改成功','index.php');
    }else{
        redirect('修改失败',$_SERVER['HTTP_REFERER']);
    }
